package com.tal.bcc.pad.cloud.thread;

import java.util.LinkedList;

public class CloudQueue {
    private LinkedList<CloudUpload> list = new LinkedList();

    public CloudQueue() {
    }

    public synchronized void clear() {
        this.list.clear();
    }

    public boolean QueueEmpty() {
        return this.list.isEmpty();
    }

    public synchronized void putQueue(CloudUpload o) {
        this.list.addLast(o);
    }

    public synchronized CloudUpload deQueue() {
        return !this.list.isEmpty() ? (CloudUpload)this.list.removeFirst() : null;
    }

    public synchronized int QueueLength() {
        return this.list.size();
    }

    public synchronized CloudUpload queuePeek() {
        return (CloudUpload)this.list.getFirst();
    }
}
